package com.atguigu.spring;

import com.atguigu.spring.bean.Person;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MainTest {

	public static void main(String[] args) {
		/*ClassPathXmlApplicationContext classPathXmlApplicationContext =
				new ClassPathXmlApplicationContext("beans.xml");
		Person bean = classPathXmlApplicationContext.getBean(Person.class);
		System.out.println(bean);*/
		ApplicationContext classPathXmlApplicationContext =
				new ClassPathXmlApplicationContext("beans.xml");
		Person bean = classPathXmlApplicationContext.getBean(Person.class);
		ApplicationContext context = bean.getContext();
		System.out.println(context);
		System.out.println(context==classPathXmlApplicationContext);


	}
}
